/*
 * FileName: Msg.java
 * Author:   zzw
 * Date:     2018年05月29日
 * Description:
 */
package com.chezhibao.trace.vo;

/**
 * 〈〉<br>
 * 〈〉
 *
 * @author zzw
 * @see [相关类/方法]（可选）
 * @since [产品/模块版本]（可选）
 */
public class Msg {

    private Long startTime;
    private String appname;
    private String rpcId;
    private String span;
    private String[] spans = new String[2];
    private String spanServer;
    private String traceName;
    private String resultCode;
    private String userData;
    private String serverData; //服务端数据
    private String serviceName;
    private String methodName;
    private String remoteIp;
    private String requestSize;
    private String responseSize;
    private String sql;
    private Integer rpcType;
    private String qualifer;
    private String rpcTypeName;

    public Msg() {

    }

    public Msg(Message message) {
        this.startTime = message.getStartTime();
        this.appname = message.getAppname();
        this.rpcId = message.getRpcId();
        this.span = message.getSpan();
        this.traceName = message.getTraceName();
        this.resultCode = message.getResultCode();
        this.userData = message.getUserData();
        this.serverData = message.getServerData();
        this.serviceName = message.getServiceName();
        this.methodName = message.getMethodName();
        this.remoteIp = message.getRemoteIp();
        this.requestSize = message.getRequestSize() + "";
        this.responseSize = message.getResponseSize() + "";
        this.sql = message.getSql();
        this.rpcType = message.getRpcType();
        this.qualifer = message.getQualifer();
    }

    public Msg(Long startTime, Integer rpcType, String appname, String rpcId, String span, String traceName, String resultCode,
               String userData, String serviceName, String methodName, String remoteIp, Integer requestSize, Integer responseSize,String serverData) {
        this.startTime = startTime;
        this.appname = appname;
        this.rpcId = rpcId;
        this.span = span;
        this.traceName = traceName;
        this.resultCode = resultCode;
        this.userData = userData;
        this.serverData = serverData;
        this.serviceName = serviceName;
        this.methodName = methodName;
        this.remoteIp = remoteIp;
        this.requestSize = requestSize + "";
        this.responseSize = responseSize + "";
    }

    public Long getStartTime() {
        return startTime;
    }

    public void setStartTime(Long startTime) {
        this.startTime = startTime;
    }

    public String getAppname() {
        return appname;
    }

    public void setAppname(String appname) {
        this.appname = appname;
    }

    public String getRpcId() {
        return rpcId;
    }

    public void setRpcId(String rpcId) {
        this.rpcId = rpcId;
    }

    public String getSpan() {
        return span;
    }

    public void setSpan(String span) {
        this.span = span;
    }

    public String getTraceName() {
        return traceName;
    }

    public void setTraceName(String traceName) {
        this.traceName = traceName;
    }

    public String getResultCode() {
        return resultCode;
    }

    public void setResultCode(String resultCode) {
        this.resultCode = resultCode;
    }

    public String getUserData() {
        return userData;
    }

    public void setUserData(String userData) {
        this.userData = userData;
    }

    public String getServiceName() {
        return serviceName;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public String getRemoteIp() {
        return remoteIp;
    }

    public void setRemoteIp(String remoteIp) {
        this.remoteIp = remoteIp;
    }

    public String getRequestSize() {
        return requestSize;
    }

    public void setRequestSize(String requestSize) {
        this.requestSize = requestSize;
    }

    public String getResponseSize() {
        return responseSize;
    }

    public void setResponseSize(String responseSize) {
        this.responseSize = responseSize;
    }

    public String getSpanServer() {
        return spanServer;
    }

    public void setSpanServer(String spanServer) {
        this.spanServer = spanServer;
    }

    public String[] getSpans() {
        return spans;
    }

    public void setSpans(String[] spans) {
        this.spans = spans;
    }

    public String getServerData() {
        return serverData;
    }

    public void setServerData(String serverData) {
        this.serverData = serverData;
    }

    public String getSql() {
        return sql;
    }

    public void setSql(String sql) {
        this.sql = sql;
    }

    public Integer getRpcType() {
        return rpcType;
    }

    public void setRpcType(Integer rpcType) {
        this.rpcType = rpcType;
    }

    public String getQualifer() {
        return qualifer;
    }

    public void setQualifer(String qualifer) {
        this.qualifer = qualifer;
    }

    public String getRpcTypeName() {
        return rpcTypeName;
    }

    public void setRpcTypeName(String rpcTypeName) {
        this.rpcTypeName = rpcTypeName;
    }
}
